home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr13 / aurora2c.zip / TIPS.DOX < prev    next >
Text File  |  1995-04-07  |  17KB  |  416 lines

  1.  
  2.  
  3. Miscellaneous Aurora User Tips
  4. ──────────────────────────────
  5. This file contains a few miscellaneous Aurora user tips which you may
  6. wish to review. For complete documentation on how to install and use
  7. Aurora, see the Aurora Editor Users Guide (USER.DOX). Note that any key
  8. definitions shown here are the Aurora-style defaults.
  9.  
  10.  
  11. Basic Configuration
  12. ───────────────────
  13.  ∙ The editor should always be installed in an empty directory. Never
  14.    mix files from different editor versions.
  15.  
  16.  ∙ Whenever you make a change to any of the editor configuration files
  17.    (such as CONFIG.AML, KBD.AML, MENU.AML, etc.), you must enter the
  18.    'recompile' command ('Recompile the editor' <alt f2> on the Set menu)
  19.    for your changes to take effect.
  20.  
  21.  ∙ If you prefer to start Aurora by another name, you can simply rename
  22.    the file A.EXE to whatever you wish (such as E.EXE). Do not rename
  23.    any other files distributed with the editor.
  24.  
  25.  ∙ You can re-install Aurora by selecting 'Run installation' from the
  26.    Sample Utilities Macros menu (on the Macro menu).
  27.  
  28.  
  29. The Keyboard
  30. ────────────
  31.  ∙ When adding new key definitions to KBD.AML, be sure to place each
  32.    definition in the appropriate 'object' for the window in which you
  33.    would like the key to be active. For most editing key definitions,
  34.    this will be the 'edit' object.
  35.  
  36.  ∙ If you have added or changed keyboard definitions, you will probably
  37.    also want to change any Menu definitions which show the old keys.
  38.  
  39.  ∙ To prevent the editor from using the keypad <grey/>, <grey*>,
  40.    <grey->, and <grey+> keys as function keys, simply remove these
  41.    function key definitions from KBD.AML. Be sure to remove them from
  42.    within both the 'prompt' and 'edit' objects.
  43.  
  44.  ∙ To execute a key or macro function from the DOS command line, use the
  45.    '-e' command line option. Key or event names must be enclosed in
  46.    double quotes. For example:
  47.  
  48.      C>a -emymacro
  49.         // executes the function 'mymacro' after the editor is started
  50.  
  51.      C>a -e"<shift f1>" -e"<alt =>"
  52.         // simulates <shift f1>, <alt => after the editor is started
  53.  
  54.  ∙ New keyboard layouts for other editors/word processors may be added
  55.    periodically to the Aurora Support BBS (see READ.ME for access
  56.    details). Check the BBS if your favorite layout is not included in
  57.    the distributed version of Aurora.
  58.  
  59.  
  60. The Mouse
  61. ─────────
  62.  ∙ If windows scroll too fast when using the mouse, change the
  63.    'MouDelay' setting in CONFIG.AML to a higher value.
  64.  
  65.  ∙ To hide the mouse pointer whenever a key pressed, change the
  66.    'MouseOpt' setting in CONFIG.AML to 'd'.
  67.  
  68.  
  69. The Menus
  70. ─────────
  71.  ∙ If part of a pull-down menu is displayed off the edge of the screen,
  72.    you can use the mouse to grab the menu border and drag the menu to a
  73.    better position.
  74.  
  75.  ∙ To hide the menu bar so that it is only displayed when <esc> or the
  76.    right mouse button is pressed, remove 'm' from the 'EditStyle'
  77.    setting in CONFIG.AML.
  78.  
  79.  ∙ To jump quickly to a file within a file picklist or the file manager,
  80.    enter the first letter of the desired filename repeatedly until the
  81.    cursor is positioned at the file.
  82.  
  83.  
  84. Prompts
  85. ───────
  86.  ∙ The ASCII Chart <alt => can be displayed from within a prompt and
  87.    used to enter any character. The 'literal' <ctrl [> command can also
  88.    be used to enter any character in a prompt.
  89.  
  90.  ∙ Use <pgup> or <pgdn> within a prompt, or press the left mouse button
  91.    on the retrieve tab () to display a popup menu of all prompt
  92.    history. You can enter a history string into the prompt by pressing
  93.    the <enter> key or the left mouse button.
  94.  
  95.  ∙ Use the 'Prompt Style' command on the Window menu to sample the four
  96.    editor prompt styles. To change the default prompt style when the
  97.    editor is started, see the 'PromptStyle' configuration setting in
  98.    CONFIG.AML.
  99.  
  100.  ∙ To move the cursor a relative number of lines away from the current
  101.    position in the 'goto line' <ctrl j> prompt, specify '+' or '-'
  102.    before the line number.
  103.  
  104.  ∙ The 'Macro Expression' prompt <ctrl v> on the Macro menu can be used
  105.    as a command line calculator, since the macro language compiler and
  106.    interpreter are available at this prompt. For example:
  107.  
  108.      Macro Expression>  say 1 + 2 + 30 - 40    <enter>
  109.        // displays -7
  110.      Macro Expression>  msgbox (4 * 15) mod 7  <enter>
  111.        // displays 4
  112.      Macro Expression>  write 1 + 2 * 3 + 4    <enter>
  113.        // enters the string '11' at the cursor
  114.  
  115.  
  116. The Desktop
  117. ───────────
  118.  ∙ You can prevent windows from remembering their sizes, cursor
  119.    positions, and settings by changing the 'SavePosition' setting in
  120.    CONFIG.AML to 'n'.
  121.  
  122.  ∙ To use the existing DOS screen as the editor background when the
  123.    editor is started, change the 'VidStr' setting in CONFIG.AML to ''
  124.    (null).
  125.  
  126.  ∙ If your video card supports special video modes such as 132 x 43, you
  127.    can use these video modes within the editor by setting the 'VidCols'
  128.    and 'VidRows' in CONFIG.AML to zero. Then set the desired video mode
  129.    in DOS before starting the editor.
  130.  
  131.  ∙ Use the 'showentry' command to display the screen as it appeared in
  132.    DOS before the editor was started.
  133.  
  134.  
  135. Syntax Highlighting
  136. ───────────────────
  137.  ∙ To conserve editor resources, include only the syntax highlighting
  138.    definitions in SYNTAX.AML that you actually use.
  139.  
  140.  ∙ Additional syntax highlighting definitions are containing in the file
  141.    SYNTAX2.AML.
  142.  
  143.  ∙ If you are using syntax highlighting with multi-line comments in your
  144.    program source code, you may wish to increase the number of lines to
  145.    scan backward in SYNTAX.AML, for the file extension you are editing.
  146.    Note however, that this will decrease scrolling performance for
  147.    highlighted files.
  148.  
  149.  ∙ The 'hiliteword' <ctrl \> command highlights all occurrences of the
  150.    word at the cursor. This can be very useful for finding instances of
  151.    a word in a document, or marking occurrences of variables, functions,
  152.    or other identifiers in your program source code.
  153.  
  154.  ∙ Individual keywords can be highlighted in colors different from the
  155.    default keyword color by treating the keyword as an object variable
  156.    and assigning it the desired color attribute. For example, in
  157.    SYNTAX.AML:
  158.  
  159.      keyword
  160.        .
  161.        .      // end of keyword list
  162.  
  163.      _if   = color brightred on blue
  164.      _else = color yellow    on blue
  165.  
  166.  
  167. History
  168. ───────
  169.  ∙ To erase all of your existing prompt history, window positions, etc.,
  170.    simply delete HISTORY.DAT after you have exited the editor.
  171.  
  172.  ∙ Do not attempt to manually update the history file HISTORY.DAT. This
  173.    file is automatically updated by the editor during normal usage.
  174.  
  175.  
  176. Opening Files
  177. ─────────────
  178.  ∙ To open a file manager window for the current directory from the DOS
  179.    command line, enter "a .".
  180.  
  181.  ∙ To open a file from the DOS command line and place the cursor on a
  182.    specific line, enter the option 'l' followed by the line number. For
  183.    example:
  184.  
  185.      C>a myfile.txt/l253
  186.        // opens 'myfile.txt' and places the cursor on line 253
  187.  
  188.  ∙ To open a binary file from the DOS command line or the Open prompt
  189.    ('askopen' <alt e> on the File menu) using a specific line length,
  190.    enter the option 'b' followed by the line length. For example:
  191.  
  192.      C>a myfile.txt/b240
  193.        // opens 'myfile.txt' in binary mode with a fixed line length
  194.        //   of 240
  195.  
  196.  ∙ To configure the editor so that tab characters (ASCII 9) are
  197.    automatically expanded when files are opened, see example 21 of
  198.    EXAMPLE.AML in the MACRO subdirectory.
  199.  
  200.  ∙ If you are using Aurora in an MS Windows 3.x DOS box running in
  201.    enhanced mode, you can transfer up to 16k of text data to and from
  202.    the Windows clipboard. This is done by loading from or saving to a
  203.    file with the special drive name: ^. For example, from the Open and
  204.    Insert and Save block prompts:
  205.  
  206.      File to insert in MYFILE.TXT>  ^:c
  207.        // insert the contents of the Windows clipboard after the cursor
  208.  
  209.      Save block as>  ^:c
  210.        // copy marked text to the Windows clipboard
  211.  
  212.  
  213. Searching
  214. ─────────
  215.  ∙ Frequently-used search strings can be saved in a separate file and
  216.    copied to a find prompt as needed by using the 'copyblock2' <alt c>
  217.    or 'paste' <grey*> commands. This can be especially convenient for
  218.    long or complex regular expression patterns.
  219.  
  220.  ∙ To count the occurrences of a search string, use the 'a' search
  221.    option. For example:
  222.  
  223.      Find>  gizmo/a  <enter>
  224.        // displays the number of occurrences of the word 'gizmo'
  225.        //   from the cursor to the end of the file
  226.  
  227.  ∙ Use regular expression searching to search for the beginning and/or
  228.    end of lines. Do not attempt to search for line delimiter characters
  229.    (such as carriage returns and linefeeds) in non-binary files. In the
  230.    normal, non-binary editing mode, line delimiter characters are
  231.    removed from the end of each line when the file is loaded and
  232.    re-appended to the end of each line when the file is saved.
  233.  
  234.  ∙ The 'Find Occurrences' <ctrl h> command can be useful for extracting
  235.    lines from a flat database file that match search criteria. For
  236.    example:
  237.  
  238.      Find Occurrences of>  Joe/b
  239.        // extract all lines where 'Joe' is found within a column mark
  240.  
  241.  ∙ The 'Find Occurrences' <ctrl h> command can be used together with
  242.    regular expression searching to display a list of function headers in
  243.    your program source code. For example:
  244.  
  245.      Find Occurrences of>  ^[a-zA-Z_].*\(.*[~;]$/x
  246.        // finds C/C++ function definitions beginning in column 1
  247.  
  248.      Find Occurrences of>  ^ *{function}|{key}.*$/x
  249.        // finds AML function and key definitions
  250.  
  251.  ∙ Selecting a file from a file manager scan window (generated by the
  252.    'askscan' <ctrl s> command) will position the cursor to the first
  253.    occurrence of the scan search string. Use the 'findlast' <ctrl l>
  254.    command to find other occurrences.
  255.  
  256.  
  257. Manipulating Text
  258. ─────────────────
  259.  ∙ The 'quote' <shift f9> and 'commentline' <alt f1> commands can both
  260.    be used for simple text quoting. <shift f9> performs block quoting,
  261.    while <alt f1> quotes and unquotes text on a line-by-line basis.
  262.  
  263.  ∙ The editor is configured at installation to use 'live word wrap' when
  264.    <ctrl w> is pressed. If you prefer the standard old-style word wrap,
  265.    change the definition of <ctrl w> in KBD.AML to:
  266.  
  267.      key  <ctrl w>    setting 'W' TOGGLE   // toggle standard word wrap
  268.  
  269.  ∙ To reformat all of the text in a file, mark the entire file using the
  270.    'markline' <alt l> command, and then enter the 'Reformat' command
  271.    <alt r> on the Block menu.
  272.  
  273.  ∙ The 'fillblock2' <ctrl k><f> command can be used to fill a marked
  274.    block with a repeating character or string. For example: to fill
  275.    columns 40-47 of a data file with the date 12/25/96, mark the
  276.    desired columns by using the 'markcolumn' command <ctrl b>, and then
  277.    enter the date at the 'fillblock2' prompt.
  278.  
  279.  ∙ The clipboard Cut Append <ctrl grey-> and Copy Append <ctrl grey+>
  280.    commands can be very useful for gathering separate blocks of text and
  281.    grouping them together in the clipboard.
  282.  
  283.  ∙ To expand tab characters (ASCII 9) in the current file, use the
  284.    'tabfile' <ctrl k><x> command.
  285.  
  286.  ∙ To ignore case when sorting marked text with the 'sortblock2' <ctrl
  287.    k><o> command, turn insert mode ON. To sort in descending order, turn
  288.    scroll lock ON.
  289.  
  290.  ∙ Have you ever been prompted to save changes in a file, and you forgot
  291.    what changes you just made? Try using the undo/redo feature to review
  292.    your changes. Just cancel the 'save' prompt and use the undo <ctrl u>
  293.    and redo <ctrl y> commands to backtrack and retrace your changes
  294.    before exiting.
  295.  
  296.  ∙ To the change the line delimiter that a file is saved with, load the
  297.    file into the editor, change the current 'Line Delimiter' setting (on
  298.    the Set menu) to the new line delimiter, and save the file.
  299.  
  300.  ∙ To disable CUA-style <shift> key marking, remove the 'smark' command
  301.    from all key definitions in KBD.AML.
  302.  
  303.  ∙ Use the 'markpara' <alt 3> command to quickly mark the paragraph at
  304.    the cursor.
  305.  
  306.  ∙ To rearrange all the words in a paragraph in sorted order:
  307.  
  308.      1. Use the 'markcolumn' <alt b> command to mark column 1 of the
  309.         entire paragraph.
  310.      2. Enter the 'formatblock2' command <alt r> to place each word on
  311.         separate line.
  312.      3. Enter the 'markpara' <alt 3> command to re-mark the separated
  313.         paragraph with a line mark.
  314.      4. Set Insert mode ON to ignore case during the sort.
  315.      5. Enter the 'sortblock2' <ctrl k><o> command to sort the words.
  316.      6. Enter the 'formatblock2' command <alt r> to re-join all
  317.         separated lines back together into a paragraph.
  318.  
  319.  
  320. Working with very large files
  321. ─────────────────────────────
  322.  ∙ If you are performing extensive 'search and replace all' operations
  323.    in a very large file, or you are making other large-scale
  324.    modifications to the file, you will get better performance if 'Undo'
  325.    is disabled on the Set menu.
  326.  
  327.  ∙ Aurora can be useful for editing very large files when running under
  328.    OS/2 or Windows. Although other editors may exploit the virtual
  329.    memory capabilities of these environments, Aurora uses its own
  330.    virtual memory (optimized for text editing), and will not force other
  331.    OS/2 or Windows applications to be swapped out or discarded when very
  332.    large files are loaded and edited. The 'memoptions' setting in
  333.    SYSTEM.AML should be set to 'o' for the best performance.
  334.  
  335.  ∙ Setting 'memoptions' to 'o' in SYSTEM.AML allows large files to be
  336.    kept open (in DOS) while they are being edited. This feature can
  337.    greatly increase the loading performance for very large files.
  338.    However, in some cases there may be conflicts with other programs
  339.    trying to access the open file. If this is a problem for you, set
  340.    'memoptions' to '' (null).
  341.  
  342.  ∙ Before saving changes to very large files, you may wish to conserve
  343.    disk space by disabling file 'Backup' on the Set menu. Obviously,
  344.    this should only be done if you have backup files elsewhere.
  345.  
  346.  ∙ If you only need to browse the first part of a very large file, or if
  347.    you have started loading a very large file by mistake, you can press
  348.    <ctrl break> to interrupt the loading process at any point. Note that
  349.    the loaded file will be truncated, and you will be prompted with
  350.    "Truncated file - are you sure?" whenever you try to save the file.
  351.  
  352.  
  353. AML Macros
  354. ──────────
  355.  ∙ To obtain context-sensitive help on a macro language statement or
  356.    function at the cursor, press <shift f1> for a brief description, or
  357.    press <shift f2> for extended help. Note that most extension
  358.    functions (EXT.AML source code) are not documented. For these
  359.    functions, the cursor is moved to the function definition in EXT.AML.
  360.  
  361.  ∙ To compile and run an external macro in the current edit window, just
  362.    enter the 'compilemacro2' <shift f10> and 'runmacro2' <shift f11>
  363.    commands. These commands help to simplify macro development and
  364.    testing.
  365.  
  366.  ∙ You can use the 'pickmacro' <shift f12> command to obtain a picklist
  367.    of macros in the MACRO subdirectory. To run a macro from the
  368.    picklist, move the cursor to the desired macro and press the <enter>
  369.    key or click the left mouse button.
  370.  
  371.  ∙ Before modifying any internal macro code (EXT.AML, KBD.AML, etc.), be
  372.    sure to make backup copies of your AML files. You should be
  373.    reasonably familiar with the macro language before attempting these
  374.    types of modifications.
  375.  
  376.  ∙ AML has a simpler function call syntax than most programming
  377.    languages. Here are a few things to keep in mind when calling AML
  378.    functions:
  379.  
  380.    If function calls with arguments are used in expressions, the entire
  381.    function call should be enclosed in parentheses, not just the
  382.    arguments. For example:
  383.  
  384.      x = fun1 (1) + fun2 (2, 3, 4);    // BASIC, Pascal, C
  385.      x = (fun1 1) + (fun2 2 3 4)       // AML
  386.  
  387.    Function calls which have no arguments, and which are preceded or
  388.    followed by operators, do not need parentheses:
  389.  
  390.      x = fun1 () + fun2 ();     // BASIC, Pascal, C
  391.      x = fun1 + fun2            // AML
  392.  
  393.    If a single function call is an argument to another function, and is
  394.    not preceded or followed by an operator, then it must be enclosed in
  395.    parentheses. For example:
  396.  
  397.      x = fun1 (1, fun2 (), fun3 (2, 3, 4));   // BASIC, Pascal, C
  398.      x = fun1 1 (fun2) (fun3 2 3 4)           // AML
  399.  
  400.  ∙ The 'key' statement is terminated by the keywords 'end', 'key', or
  401.    'function', but not by the keyword 'object'. For example:
  402.  
  403.      key <alt c>   copy          // key definition for <alt c>
  404.      key <alt d>   deleteline    // key definition for <alt d>
  405.      end                         // end is required here
  406.  
  407.      object  fmgr                // change the current object
  408.        .
  409.        .
  410.  
  411.  ∙ New macros and AML configuration files will continue to be posted on
  412.    the Aurora Support BBS (see READ.ME for access details). Many of
  413.    these macros may only be available to licensed users. You may wish to
  414.    check the BBS periodically for new macros.
  415.  
  416.